﻿using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.Contracts;

namespace System.Reactive.Disposables
{
	public sealed class CompositeDisposable
	{
		public bool IsReadOnly
		{
			get
			{
				Contract.Ensures(Contract.Result<bool>() == false, null, "Contract.Result<bool>() == false");
				return false;
			}
		}

		public CompositeDisposable(IEnumerable<IDisposable> disposables)
		{
			Contract.Requires(disposables != null, null, "disposables != null");
			//Contract.Requires(Contract.ForAll(disposables, disposable => disposable != null), null, "Contract.ForAll(disposables, disposable => disposable != null)");
		}

		public CompositeDisposable(params IDisposable[] disposables)
		{
			Contract.Requires(disposables != null, null, "disposables != null");
			//Contract.Requires(Contract.ForAll(disposables, disposable => disposable != null), null, "Contract.ForAll(disposables, disposable => disposable != null)");
		}

		public CompositeDisposable(int capacity)
		{
			Contract.Requires(capacity >= 0, null, "capacity >= 0");
		}
	}
}